package com.example.huahanshu2;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class DrawHanShu extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_draw_han_shu);
        MathView mathView=findViewById(R.id.hanshu);
        Intent intent=getIntent();
        CanvasView canvasView=findViewById(R.id.can);
        String flag=intent.getStringExtra("flag");
        canvasView.setFlag(Integer.valueOf(flag));


        String num1=intent.getStringExtra("num1");
        float num_1=Float.valueOf(num1);
        mathView.setN1(num_1);

        String num2=intent.getStringExtra("num2");
        float num_2=Float.valueOf(num2);
        mathView.setN2(num_2);

        String num3=intent.getStringExtra("num3");
        float num_3=Float.valueOf(num3);
        mathView.setN3(num_3);

        String num4=intent.getStringExtra("num4");
        float num_4=Float.valueOf(num4);
        mathView.setN4(num_4);
        mathView.setFlag(Integer.valueOf(flag));

        LogView logView=findViewById(R.id.log10);
        String num5=intent.getStringExtra("num5");
        logView.setN1(Float.valueOf(num5));
        logView.setFlag(Integer.valueOf(flag));

        EView eView=findViewById(R.id.nx);
        String bs=intent.getStringExtra("bs");
        String ds=intent.getStringExtra("ds");
        String zsbs=intent.getStringExtra("zsbs");
        eView.setN1(Float.valueOf(bs));
        eView.setN2(Float.valueOf(zsbs));
        eView.setN3(Float.valueOf(ds));
        eView.setFlag(Integer.valueOf(flag));

        SinCosTanView sinCosTanView=findViewById(R.id.sct);
        String sinb=intent.getStringExtra("sin_b");
        String sinc=intent.getStringExtra("sin_c");
        String cosb=intent.getStringExtra("cos_b");
        String cosc=intent.getStringExtra("cos_c");
        String tanb=intent.getStringExtra("tan_b");
        String tanc=intent.getStringExtra("tan_c");
        sinCosTanView.setN1(Float.valueOf(sinb));
        sinCosTanView.setN2(Float.valueOf(sinc));
        sinCosTanView.setN3(Float.valueOf(cosb));
        sinCosTanView.setN4(Float.valueOf(cosc));
        sinCosTanView.setN5(Float.valueOf(tanb));
        sinCosTanView.setN6(Float.valueOf(tanc));
        sinCosTanView.setFlag(Integer.valueOf(flag));


        Twoline twoline=findViewById(R.id.twoline);
        String cos=intent.getStringExtra("tcos");
        String tan=intent.getStringExtra("ttan");
        twoline.setN1(Float.valueOf(cos));
        twoline.setN2(Float.valueOf(tan));
        twoline.setFlag(Integer.valueOf(flag));

        Ecllipse ecllipse=findViewById(R.id.ecl);
        String ecos=intent.getStringExtra("ecos");
        String esin=intent.getStringExtra("esin");
        ecllipse.setN1(Float.valueOf(ecos));
        ecllipse.setN2(Float.valueOf(esin));
        ecllipse.setFlag(Integer.valueOf(flag));





    }
}